﻿package view.task
{
    import com.core.*;
    import com.sh.game.consts.*;
    import com.sh.game.global.*;
    import com.sh.game.net.*;
    import com.sh.game.util.*;
    import consts.*;
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.utils.*;
    import manager.*;
    import morn.core.components.*;
    import morn.core.handlers.*;
    import plugin.bagN.*;
    import plugin.taskdialog.consts.*;
    import pluginfw.*;
    import view.*;
    import view.message.*;
    import view.uilt.*;

    public class TaskTrackItem extends Component
    {
        private var _txtName:Label;
        private var _txtLink:Label;
        private var _txtNum1:Label;
        private var cfgTaskType:Object;
        private var goalTypeArr:Array;
        private var cfgtask:Object;
        private var cfgMoster:Object;
        private var cfgItem:Object;
        private var cfgNpc:Object;
        private var cfgTaskNum:Object;
        private var cfgtaskguide:Object;
        private var cfgmaps:Object;
        private var _txtDec:Label;
        private var areaStr:String;
        private var _data:Object = null;
        private var _txtGoal:Label;
        private var _txtYiJian:Label;
        public var btn:Button;
        private var _heightt:int = 20;
        private var _showGoal:Boolean = false;
        private var timeoutID:uint;
        private var losttime:int;
        public var mtaskid:int;
        private var isFirst:Boolean = true;
        private var isHasGoal:Boolean = false;
        private var tArr:Array;
        public var _color:uint = 234933074;
        private var _isshow:Boolean = true;
        private var _showTips:Boolean = false;
        private var _w:int = 0;
        private var _h:int = 0;
        private var isEnable:Boolean = true;
        private var _speed:int = 9;
        private var _txtGoal1:MyLabel;
        private var _txtLost:Label;
        private var _limitLab:Label;
        private var msg1:String;
        private var msg2:String;
        private var msg2dataArr:Array;
        private var curdata:String;
        private var buydata:String;
        private var mTasks:Object;
        private var cfgnpcs:Object;
        private var _showmc:int;
        private var eff:Clip;
        private var _effLoading:Boolean;
        private var _cfgtequan:Object;
        private static var _noTaskAsk:Boolean = true;

        public function TaskTrackItem(param1:Boolean = false)
        {
            this.cfgTaskType = ConfigDictionary.data.tasktype;
            this.goalTypeArr = new Array("", "击杀", "击杀", "使用", "采集", "解救美女", "击杀精英怪", "击杀玩家", "自身死亡", "等级提升", "拥有{0}", "拥有{0}级装备", "装备{0}", "装备{0}级装备", "通关{0}");
            this.cfgtask = ConfigDictionary.data.task;
            this.cfgMoster = ConfigDictionary.data.monster;
            this.cfgItem = ConfigDictionary.data.item;
            this.cfgNpc = ConfigDictionary.data.npc;
            this.cfgTaskNum = ConfigDictionary.data.tasknum;
            this.cfgtaskguide = ConfigDictionary.data.taskguide;
            this.cfgmaps = ConfigDictionary.data.maplist;
            this.tArr = ["", "<font color=\'#00cb52\'>【可接受】</font>", "<font color=\'#00cb52\'>【进行中】</font>", "<font color=\'#00cb52\'>【已完成】</font>"];
            this.msg2dataArr = [];
            this.mTasks = ConfigDictionary.data.task;
            this.cfgnpcs = ConfigDictionary.data.sysnpc;
            this._cfgtequan = ConfigDictionary.data.tequan;
            var _loc_2:Boolean = true;
            mouseEnabled = true;
            mouseChildren = _loc_2;
            this._txtName = new Label();
            this._txtName.width = 240;
            this._txtName.height = 20;
            this._txtName.isHtml = true;
            this._txtName.color = MColor.New52;
            this._txtName.align = "left";
            this._txtName.stroke = "0x0";
            this._txtLink = new Label();
            this._txtLink.x = 130;
            this._txtLink.width = 100;
            this._txtLink.height = 20;
            this._txtLink.color = MColor.New52;
            this._txtLink.align = "left";
            this._txtLink.stroke = "0x0";
            this._txtLink.isHtml = true;
            this._txtYiJian = new Label("<A href=\"event:yijian\">一键</A>");
            this._txtYiJian.x = 140;
            this._txtYiJian.width = 50;
            this._txtYiJian.height = 22;
            this._txtYiJian.color = this._color;
            this._txtYiJian.isHtml = true;
            this._txtYiJian.align = "left";
            this._txtYiJian.underline = true;
            this._txtYiJian.stroke = "0x0";
            this.addChild(this._txtYiJian);
            this._txtGoal = new Label();
            this._txtGoal.x = 10;
            this._txtGoal.width = 160;
            this._txtGoal.height = 22;
            this._txtGoal.color = MColor.New83;
            this._txtGoal.mouseChildren = false;
            this._txtGoal.mouseEnabled = false;
            this._txtGoal.align = "left";
            this._txtGoal.isHtml = true;
            this._txtGoal.stroke = "0x0";
            this.addChild(this._txtGoal);
            this._txtGoal1 = new MyLabel();
            this._txtGoal1.isOver = true;
            this._txtGoal1.x = 40;
            this._txtGoal1.width = 160;
            this._txtGoal1.height = 22;
            this._txtGoal1.color = this._color;
            this._txtGoal1.underline = true;
            this._txtGoal1.align = "left";
            this._txtGoal1.isHtml = true;
            this._txtGoal1.stroke = "0x0";
            this.addChild(this._txtGoal);
            this.addChild(this._txtGoal1);
            this.addChild(this._txtLink);
            this._txtLost = new MyLabel();
            this._txtLost.x = 25;
            this._txtLost.width = 180;
            this.addChild(this._txtLost);
            this.addChild(this._txtName);
            this.btn = new Button("png.common.btn_trans");
            this.btn.x = 180;
            this.btn.y = 18;
            this.addChild(this.btn);
            this.initEvent();
            return;
        }// end function

        private function initEvent() : void
        {
            this._txtGoal1.addEventListener(MouseEvent.CLICK, this.linkHandler);
            this._txtGoal1.addEventListener(MouseEvent.MOUSE_OVER, this.touchHandler);
            this._txtGoal1.addEventListener(MouseEvent.MOUSE_OUT, this.touchHandler);
            this.btn.addEventListener(MouseEvent.CLICK, this.triggeredHanlder);
            this._txtName.addEventListener(MouseEvent.CLICK, this.buyHandler);
            this._txtName.addEventListener(MouseEvent.MOUSE_OVER, this.goumaiHandler);
            this._txtName.addEventListener(MouseEvent.MOUSE_OUT, this.goumaiHandler);
            return;
        }// end function

        private function goumaiHandler(event:MouseEvent) : void
        {
            var _loc_2:String = null;
            var _loc_3:Object = null;
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_6:Object = null;
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:Object = null;
            var _loc_11:int = 0;
            var _loc_12:int = 0;
            var _loc_13:String = null;
            var _loc_14:String = null;
            var _loc_15:Object = null;
            if (this.buydata == "event:buycount")
            {
                if (event.type == MouseEvent.MOUSE_OVER)
                {
                    _loc_2 = "";
                    _loc_3 = ModelProxy.getValue("vip", "getvip");
                    _loc_4 = _loc_3.privilegeCardLevel;
                    _loc_5 = 1;
                    while (_loc_5 <= 3)
                    {
                        
                        _loc_15 = this._cfgtequan[_loc_5];
                        _loc_2 = _loc_2 + (_loc_15.name + ":" + _loc_15.fumotimes + "次\n");
                        _loc_5++;
                    }
                    _loc_6 = UserData.getOnlineData();
                    _loc_7 = int(_loc_6.viplevel);
                    _loc_8 = 0;
                    if (_loc_6.vipcache && _loc_6.vipcache[36])
                    {
                        _loc_8 = _loc_6.vipcache[36];
                    }
                    _loc_9 = 0;
                    _loc_10 = UserData.getData(UserDataType.Task);
                    _loc_11 = this.data.cfg.taskgroupid;
                    _loc_12 = int(_loc_10["buy_" + _loc_11]);
                    if (_loc_4 > 0)
                    {
                        _loc_9 = 5 + int(this._cfgtequan[_loc_4].fumotimes) - _loc_12;
                        if (_loc_9 < 0)
                        {
                            _loc_9 = 0;
                        }
                    }
                    else
                    {
                        _loc_9 = 5 - _loc_12;
                        if (_loc_9 < 0)
                        {
                            _loc_9 = 0;
                        }
                    }
                    _loc_13 = "无";
                    if (_loc_4 > 0)
                    {
                        _loc_13 = this._cfgtequan[_loc_4].name;
                    }
                    _loc_14 = MColor.getHMTL("特权用户可额外购买次数：\n", 15) + MColor.getHMTL(_loc_2, 1) + MColor.getHMTL("当前特权：" + _loc_13 + "\n" + "今日剩余可购买次数：" + _loc_9, 6);
                    this._showTips = true;
                    ModelProxy.change("tips", "normal", {data:_loc_14, p:new Point(mouseX, mouseY + 5)});
                }
                else
                {
                    if (this._showTips)
                    {
                        ModelProxy.change("tips", "state", "close");
                    }
                    this._showTips = false;
                }
            }
            return;
        }// end function

        private function touchHandler(event:MouseEvent) : void
        {
            var _loc_2:Point = null;
            if (event.type == MouseEvent.MOUSE_OVER)
            {
                if (!this._showTips)
                {
                    if (this.curdata == "uplv")
                    {
                        return;
                    }
                    _loc_2 = new Point(mouseX, mouseY);
                    ModelProxy.change("tips", "task", {data:this.data, p:localToGlobal(_loc_2)});
                    this._showTips = true;
                }
            }
            else if (event.type == MouseEvent.CLICK)
            {
                ModelProxy.change("tips", "state", "close");
                this._showTips = false;
            }
            else
            {
                if (this._showTips)
                {
                    ModelProxy.change("tips", "state", "close");
                }
                this._showTips = false;
            }
            return;
        }// end function

        private function triggeredHanlder(event:MouseEvent) : void
        {
            var nobj:Object;
            var cid:int;
            var p:Point;
            var e:* = event;
            ModelProxy.change("guidepao", "hide", GuideType.GUIDE_XY4);
            ModelProxy.change("guidepao", "hide", GuideType.GUIDE_FXFG);
            ModelProxy.change("guidepao", "hide", GuideType.GUIDE_ADQP);
            if (this.isEnable == false)
            {
                return;
            }
            if (this.areaStr == null)
            {
                return;
            }
            this.isEnable = false;
            TimeOutManager.getInstance().setTimer(function () : void
            {
                isEnable = true;
                return;
            }// end function
            , 100);
            var arr:* = this.areaStr.split("#");
            if (arr[2] > 10000)
            {
                cid = int(this.data.chapterid);
                if (cid > 0)
                {
                    p = new Point(mouseX, mouseY);
                    ModelProxy.change("plugin", "change", {target:"taskinstance", point:localToGlobal(p)});
                    return;
                }
                if (arr[2] == 10006)
                {
                    ModelProxy.change("plugin", "fireflower", null);
                    TimeOutManager.getInstance().setTimer(this.into, 0, arr[2]);
                }
                else if (ItemUilt.checkMapIsFly())
                {
                    Server.instance.send(90, 6, {mapid:arr[2]}, 0, ConnectType.SYSTEM);
                }
                return;
            }
            if (arr[1] > 0)
            {
                nobj = this.cfgnpcs[arr[1]];
                if (ItemUilt.checkMapIsFly())
                {
                    ModelProxy.change("plugin", "sendSysMsg", {name:"bag", param:{x:nobj.x, y:nobj.y, stageid:nobj.stageid}, cmd:CMDBag.MapPass});
                }
            }
            else if (ItemUilt.checkMapIsFly())
            {
                ModelProxy.change("plugin", "sendSysMsg", {name:"bag", param:{x:arr[3], y:arr[4], stageid:arr[2]}, cmd:CMDBag.MapPass});
            }
            if (arr[1] > 0)
            {
                nobj = this.cfgnpcs[arr[1]];
                ModelProxy.change("data", "taskfindpath", nobj.npcid);
            }
            return;
        }// end function

        private function buyHandler(event:MouseEvent) : void
        {
            var _loc_2:Array = null;
            var _loc_3:Array = null;
            var _loc_4:Point = null;
            var _loc_5:int = 0;
            var _loc_6:Object = null;
            var _loc_7:int = 0;
            var _loc_8:Object = null;
            var _loc_9:int = 0;
            var _loc_10:int = 0;
            if (this.buydata)
            {
                if (this._showTips)
                {
                    ModelProxy.change("tips", "state", "close");
                }
                _loc_2 = this.buydata.split(":", 2);
                if (_loc_2.length == 2)
                {
                    if (_loc_2[0] == "event")
                    {
                        _loc_3 = (_loc_2[1] as String).split(",");
                        _loc_4 = new Point(mouseX, mouseY);
                        if (_loc_3.length > 0)
                        {
                            if (_loc_3[0] == "buycount")
                            {
                                _loc_5 = 0;
                                _loc_6 = ModelProxy.getValue("data", "tasks");
                                _loc_7 = this.cfgtask[this.data.cfg.taskid].taskgroupid;
                                _loc_8 = ModelProxy.getValue("vip", "getvip");
                                _loc_9 = _loc_8.privilegeCardLevel;
                                _loc_10 = int(_loc_6["buy_" + _loc_7]);
                                if (_loc_9 < 1 && _loc_10 >= 5)
                                {
                                    Alert2.show("您的免费次数已用完，只有月卡用户才能继续购买降妖伏魔次数，是否确认开通月卡？", "", ["确定", "取消"], this.buyCheckHandler1, null, false, true);
                                    return;
                                }
                                if (_loc_9 < 1)
                                {
                                    _loc_5 = 5 - int(_loc_6["buy_" + _loc_7]);
                                }
                                else
                                {
                                    _loc_5 = 5 + int(this._cfgtequan[_loc_9].fumotimes) - int(_loc_6["buy_" + _loc_7]);
                                }
                                if (_loc_5 <= 0)
                                {
                                    ModelProxy.change("movetips", "error", "您今日额外购买降妖伏魔次数已用完！");
                                    return;
                                }
                                if (_loc_5 >= 1)
                                {
                                    if (this._isshow)
                                    {
                                        Alert2.show("你要消耗50元宝购买一次降妖伏魔次数", "", ["购买一次", "取消"], this.buyCheckHandler, null, false, true, true);
                                    }
                                    else
                                    {
                                        PluginManager.instance.sendToServer("taskdialog", CMDTaskdialog.BuyCount, this.data.cfg.taskid);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return;
        }// end function

        private function buyCheckHandler1(param1:int, param2:Object) : void
        {
            if (param1 == 0)
            {
                ModelProxy.change("plugin", "open", {target:"viptq"});
            }
            return;
        }// end function

        private function linkHandler(event:MouseEvent) : void
        {
            var _loc_2:Object = null;
            var _loc_3:Point = null;
            var _loc_4:Array = null;
            var _loc_5:int = 0;
            var _loc_6:Point = null;
            var _loc_7:Object = null;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:Array = null;
            var _loc_11:int = 0;
            var _loc_12:String = null;
            var _loc_13:String = null;
            var _loc_14:Array = null;
            var _loc_15:Array = null;
            var _loc_16:int = 0;
            var _loc_17:Object = null;
            var _loc_18:int = 0;
            var _loc_19:Object = null;
            var _loc_20:int = 0;
            NewGuideView.getInstance().hide();
            if (this.curdata)
            {
                ModelProxy.change("tips", "state", "close");
                if (this.curdata == "weiduan")
                {
                    ModelProxy.change("plugin", "change", {target:"weiduandenglu", point:new Point(GlobalLayer.instance.root.stageWidth / 2, GlobalLayer.instance.root.stageHeight / 2)});
                    return;
                }
                if (this.curdata == "chapter")
                {
                    _loc_7 = new Object();
                    _loc_7.npcid = 199;
                    _loc_7.taskid = this.data.taskid;
                    _loc_8 = int(GlobalLayer.instance.root.stageWidth / 2 + 80);
                    _loc_9 = int(GlobalLayer.instance.root.stageHeight / 2 - 320);
                    _loc_3 = new Point(mouseX, mouseY);
                    ModelProxy.change("plugin", "open", {target:"taskdialog", point:localToGlobal(_loc_3), data:_loc_7, top:new Point(_loc_8, _loc_9)});
                    return;
                }
                if (this.curdata == "uplv")
                {
                    ModelProxy.change("plugin", "change", {target:"bossChallenge", point:new Point(GlobalLayer.instance.root.stageWidth / 2, GlobalLayer.instance.root.stageHeight / 2)});
                    return;
                }
                if (this.curdata == "yabiao")
                {
                    ModelProxy.change("plugin", "open", {target:"ems", point:new Point(GlobalLayer.instance.root.stageWidth / 2, GlobalLayer.instance.root.stageHeight / 2 - 120), top:new Point((GlobalLayer.instance.root.stageWidth - 740) / 2, 100)});
                    return;
                }
                _loc_4 = this.curdata.split(":", 2);
                if (_loc_4.length == 2)
                {
                    if (_loc_4[0] == "event")
                    {
                        _loc_10 = (_loc_4[1] as String).split(",");
                        _loc_3 = new Point(mouseX, mouseY);
                        if (_loc_10.length > 0)
                        {
                            if (_loc_10[0] == "fnpc")
                            {
                                _loc_2 = this.cfgnpcs[_loc_10[1]];
                                ModelProxy.change("data", "taskfindpath", _loc_2.npcid);
                                ModelProxy.change("zone", "stopGuaji", null);
                                ModelProxy.change("zone", "autoMove", {x:_loc_2.x, y:_loc_2.y, tostageid:_loc_2.stageid, onhorse:true});
                            }
                            else if (_loc_10[0] == "tnpc")
                            {
                                _loc_2 = this.cfgnpcs[_loc_10[1]];
                                ModelProxy.change("data", "taskfindpath", _loc_2.npcid);
                                ModelProxy.change("zone", "stopGuaji", null);
                                ModelProxy.change("zone", "autoMove", {x:_loc_2.x, y:_loc_2.y, tostageid:_loc_2.stageid, onhorse:true});
                            }
                            else if (_loc_10[0] == "goal")
                            {
                                if (_loc_10[4] == "3")
                                {
                                    _loc_2 = this.cfgnpcs[_loc_10[1]];
                                    ModelProxy.change("data", "taskfindpath", _loc_2.npcid);
                                    ModelProxy.change("zone", "stopGuaji", null);
                                    ModelProxy.change("zone", "autoMove", {x:_loc_2.x, y:_loc_2.y, tostageid:_loc_2.stageid, onhorse:true});
                                }
                                else if (_loc_10[3] > 10000)
                                {
                                    _loc_11 = int(this.data.chapterid);
                                    if (_loc_11 > 0)
                                    {
                                        _loc_3 = new Point(mouseX, mouseY);
                                        ModelProxy.change("plugin", "change", {target:"taskinstance", point:localToGlobal(_loc_3)});
                                        return;
                                    }
                                    if (_loc_10[3] == 10006)
                                    {
                                        ModelProxy.change("plugin", "fireflower", null);
                                        TimeOutManager.getInstance().setTimer(this.into, 0, _loc_10[3]);
                                    }
                                    else
                                    {
                                        _loc_5 = UserData.getUserData("mapid");
                                        if (_loc_5 == _loc_10[3])
                                        {
                                            _loc_6 = new Point(_loc_10[1], _loc_10[2]);
                                            _loc_4 = [_loc_10[1], _loc_10[2], 0, _loc_10[3]];
                                            ModelProxy.change("zone", "stopGuaji", null);
                                            ModelProxy.change("data", "taskfindmaster", _loc_4);
                                            ModelProxy.change("zone", "autoMove", {x:_loc_10[1], y:_loc_10[2], tostageid:_loc_10[3], onhorse:true});
                                            ModelProxy.change("guide", "stagehide", null);
                                        }
                                        else
                                        {
                                            Server.instance.send(90, 6, {mapid:_loc_10[3]}, 0, ConnectType.SYSTEM);
                                        }
                                    }
                                }
                                else
                                {
                                    if (int(_loc_10[3]) == 0)
                                    {
                                        return;
                                    }
                                    if (this.data.type == 5 || this.data.type == 6 || this.data.type == 7 || this.data.taskid >= 109 && this.data.taskid <= 112)
                                    {
                                        ModelProxy.change("data", "taskfindwoman", true);
                                    }
                                    _loc_6 = new Point(0, 0);
                                    if (int(_loc_10[3]) == 1024)
                                    {
                                        _loc_12 = _loc_10[1];
                                        _loc_13 = _loc_10[2];
                                        _loc_14 = _loc_12.split(";");
                                        _loc_15 = _loc_13.split(";");
                                        _loc_6.x = _loc_14[0];
                                        _loc_6.y = _loc_15[0];
                                    }
                                    else if (int(_loc_10[3]) == 1097)
                                    {
                                        _loc_5 = UserData.getUserData("mapid");
                                        if (int(_loc_10[3] == _loc_5))
                                        {
                                            ModelProxy.change("zone", "autodig", null);
                                            return;
                                        }
                                    }
                                    else
                                    {
                                        _loc_6.x = _loc_10[1];
                                        _loc_6.y = _loc_10[2];
                                    }
                                    ModelProxy.change("data", "taskfindmaster", [_loc_10[1], _loc_10[2], int(_loc_10[5]), _loc_10[3]]);
                                    ModelProxy.change("zone", "stopGuaji", null);
                                    ModelProxy.change("zone", "autoMove", {x:_loc_10[1], y:_loc_10[2], tostageid:_loc_10[3], onhorse:true});
                                }
                            }
                            else if (_loc_10[0] == "qianghua")
                            {
                                _loc_8 = int((GlobalLayer.instance.root.stageWidth - 700) / 2);
                                ModelProxy.change("plugin", "open", {target:"qianghua", point:new Point(GlobalLayer.instance.root.stageWidth / 2, GlobalLayer.instance.root.stageHeight / 2 - 120), top:new Point(_loc_8, 100), data:1});
                            }
                            else if (_loc_10[0] == "yijian")
                            {
                                Alert2.show("确定消费 " + (21 - this.data.rctask) * 10 + " 元宝直接完成今天的每日任务吗？", "", ["确定", "取消"], this.backfunc);
                            }
                            else if (_loc_10[0] == "buycount")
                            {
                                _loc_16 = 0;
                                _loc_17 = ModelProxy.getValue("data", "tasks");
                                _loc_18 = this.cfgtask[this.data.taskid].taskgroupid;
                                _loc_19 = ModelProxy.getValue("vip", "getvip");
                                _loc_20 = _loc_19.privilegeCardLevel;
                                if (_loc_20 < 1)
                                {
                                    ModelProxy.change("movetips", "error", "拥有特权卡才能购买");
                                    return;
                                }
                                _loc_16 = int(this._cfgtequan[_loc_20].fumotimes) - int(_loc_17["buy_" + _loc_18]);
                                if (_loc_16 < 0)
                                {
                                    ModelProxy.change("movetips", "error", "您今日已达到购买次数上限");
                                    return;
                                }
                                if (_loc_16 >= 1)
                                {
                                    Alert2.show("你要消耗50元宝购买一次降妖伏魔次数", "", ["购买一次", "取消"], this.buyCheckHandler, null, false, true);
                                }
                            }
                        }
                    }
                }
            }
            return;
        }// end function

        private function buyCheckHandler(param1:int, param2:Object) : void
        {
            if (param1 == 0)
            {
                PluginManager.instance.sendToServer("taskdialog", CMDTaskdialog.BuyCount, this.data.cfg.taskid);
            }
            else if (param1 == 100)
            {
                PluginManager.instance.sendToServer("taskdialog", CMDTaskdialog.BuyCount, this.data.cfg.taskid);
                this._isshow = false;
            }
            else if (param1 == 101)
            {
                this._isshow = false;
            }
            return;
        }// end function

        private function backfunc(param1:int, param2:Object) : void
        {
            if (param1 == 0)
            {
                Server.instance.send(123, 7, {taskid:this.data.taskid}, 0, ConnectType.SYSTEM);
            }
            return;
        }// end function

        private function into(param1:int) : void
        {
            Server.instance.send(90, 6, {mapid:param1}, 0, ConnectType.SYSTEM);
            return;
        }// end function

        override public function get height() : Number
        {
            return (this._heightt + 1);
        }// end function

        public function get data() : Object
        {
            return this._data;
        }// end function

        public function set showmc(param1:int) : void
        {
            this._showmc = param1;
            if (this._showmc > 0)
            {
                if (!this.eff)
                {
                    if (!this._effLoading)
                    {
                        App.mloader3.loadSWF(Config.getUrl("assets/images/speff/horn.swf"), 1, new Handler(this.onComp));
                        this._effLoading = true;
                    }
                }
                else
                {
                    if (this.eff.parent == null)
                    {
                        this.addChild(this.eff);
                    }
                    this.eff.height = this._showmc * 20;
                }
            }
            else if (this.eff && this.eff.parent)
            {
                this.eff.parent.removeChild(this.eff);
            }
            return;
        }// end function

        private function onComp(param1) : void
        {
            this._effLoading = true;
            this.eff = new Clip("png.speff.horn", 12, 1);
            this.eff.autoPlay = true;
            this.eff.sizeGrid = "20,20,20,20";
            this.eff.width = 135;
            this.eff.y = 18;
            this.eff.height = 38;
            this.eff.blendMode = BlendMode.ADD;
            this.eff.interval = 160;
            this.eff.mouseChildren = false;
            this.eff.mouseEnabled = false;
            this.showmc = this._showmc;
            return;
        }// end function

        public function set data(param1:Object) : void
        {
            var _loc_2:Object = null;
            var _loc_5:Object = null;
            var _loc_6:Object = null;
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:Object = null;
            var _loc_11:Array = null;
            var _loc_12:int = 0;
            var _loc_13:String = null;
            var _loc_14:Array = null;
            var _loc_15:int = 0;
            var _loc_16:Object = null;
            var _loc_17:Object = null;
            var _loc_18:String = null;
            var _loc_19:Array = null;
            var _loc_20:int = 0;
            var _loc_21:int = 0;
            var _loc_22:Object = null;
            this._heightt = 20;
            this._data = param1;
            this._h = 0;
            this._showGoal = true;
            this._txtGoal.visible = true;
            this._txtGoal1.visible = true;
            this.isHasGoal = false;
            this._txtGoal1.x = 40;
            var _loc_3:int = 20;
            if (this._txtDec && this._txtDec.parent)
            {
                this._txtDec.parent.removeChild(this._txtDec);
                this._txtDec = null;
            }
            var _loc_4:* = UserData.getData(UserDataType.Task);
            if (this.data)
            {
                this.mtaskid = this.data.cfg.taskid;
                if (this.timeoutID)
                {
                    clearInterval(this.timeoutID);
                    this.timeoutID = 0;
                }
                this._txtYiJian.visible = false;
                this._h = this._h + 20;
                if (this.data.cfg.type == 3)
                {
                    if (this.data.puls.rctask > 20)
                    {
                        this._txtName.text = "<font color=\'#4ba0de\'>[" + this.cfgTaskType[this.data.cfg.type].desc + "]</font> 每日任务(已完成)";
                        this.btn.visible = false;
                        return;
                    }
                    this._txtName.text = "<font color=\'#4ba0de\'>[" + this.cfgTaskType[this.data.cfg.type].desc + "]</font> 每日任务<font color=\'#FFFFFF\'>(" + this.data.plus.rctask + "/20)</font>";
                    this._txtYiJian.visible = true;
                }
                else if (this.data.cfg.type == 4 || this.data.cfg.taskgroupid == 5 || this.data.cfg.taskgroupid == 99)
                {
                    _loc_7 = this.data.tid;
                    _loc_8 = 0;
                    _loc_9 = this.data.cfg.taskgroupid;
                    if (this.data.cfg.taskgroupid == 99)
                    {
                        if (this.data.plus.tstype == 1)
                        {
                            _loc_2 = UserData.getOnlineData();
                            if (_loc_2)
                            {
                                _loc_8 = 2 - int(_loc_2.ems);
                            }
                        }
                        else if (this.data.plus.tstype == 2)
                        {
                            _loc_2 = UserData.getOnlineData();
                            _loc_8 = 2;
                            if (_loc_2 && _loc_2.dayinstances)
                            {
                                _loc_8 = 2 - int(_loc_2.dayinstances[16001]);
                            }
                        }
                        else if (this.data.plus.tstype == 3)
                        {
                            _loc_2 = UserData.getOnlineData();
                            _loc_10 = ConfigDictionary.data.instance;
                            _loc_11 = [15005, 15006, 15008, 15009, 15010];
                            _loc_12 = 0;
                            while (_loc_12 < _loc_11.length)
                            {
                                
                                _loc_13 = _loc_10[_loc_11[_loc_12]].limit_times;
                                _loc_14 = _loc_13.split(" ");
                                _loc_8 = _loc_8 + int(_loc_14[1]);
                                _loc_12++;
                            }
                            if (_loc_2 && _loc_2.dayinstances)
                            {
                                _loc_8 = _loc_8 - int(_loc_2.dayinstances[15005]) - int(_loc_2.dayinstances[15006]) - int(_loc_2.dayinstances[15008]) - int(_loc_2.dayinstances[15009]) - int(_loc_2.dayinstances[15060]);
                            }
                        }
                    }
                    else
                    {
                        _loc_8 = this.cfgTaskNum[_loc_9].num - int(_loc_4["group_" + _loc_9]);
                    }
                    if (_loc_8 < 0)
                    {
                        _loc_8 = 0;
                    }
                    if (_loc_8 == 0 && this.data.plus.state == 1)
                    {
                        if (this.data.cfg.type == 4)
                        {
                            this.buydata = "event:buycount";
                            this._txtName.text = "<font color=\'#4ba0de\'>[" + this.cfgTaskType[this.data.cfg.type].desc + "]</font> " + this.data.cfg.name + " <font color=\'#FF0000\'><u><a href=\"event:buycount\">购买次数</a></u></font>";
                        }
                        else
                        {
                            this._txtName.text = "<font color=\'#4ba0de\'>[" + this.cfgTaskType[this.data.cfg.type].desc + "]</font> " + this.data.cfg.name;
                        }
                    }
                    else
                    {
                        this._txtName.text = "<font color=\'#4ba0de\'>[" + this.cfgTaskType[this.data.cfg.type].desc + "]</font> " + this.data.cfg.name + this.tArr[this.data.plus.state];
                    }
                }
                else if (ItemUilt.checkUserLevelRein(this.data.cfg.level, 0))
                {
                    this._txtName.text = "<font color=\'#4ba0de\'>[" + this.cfgTaskType[this.data.cfg.type].desc + "]</font> " + this.data.cfg.name + this.tArr[this.data.plus.state];
                }
                else
                {
                    this._txtName.text = "<font color=\'#4ba0de\'>[" + this.cfgTaskType[this.data.cfg.type].desc + "]</font> " + this.data.cfg.name + MColor.getHMTL("(" + this.data.cfg.level + "级可接)", 9);
                }
                _loc_5 = ModelProxy.getValue("data", "ringdata");
                this.btn.visible = true;
                _loc_6 = UserData.getUserData();
                if (int(_loc_6.rein) <= 0 && _loc_6.level < this.data.cfg.level)
                {
                    if (_noTaskAsk && _loc_6.level > 48)
                    {
                        _noTaskAsk = false;
                    }
                    this._txtLink.color = MColor.T_RED;
                    this._txtGoal.visible = false;
                    this._showGoal = false;
                    this.addreciveHtml(this.data.cfg, "fnpc");
                    this._txtGoal1.text = "";
                    this._txtGoal1.color = MColor.New19;
                    this.btn.visible = false;
                }
                else if (this._showGoal)
                {
                    if (this.data.cfg.taskgroupid == 99)
                    {
                        _loc_15 = 0;
                        if (this.data.plus.tstype == 1)
                        {
                            _loc_15 = 140;
                        }
                        else if (this.data.plus.tstype == 2)
                        {
                            _loc_15 = 124;
                        }
                        else if (this.data.plus.tstype == 3)
                        {
                            _loc_15 = 248;
                        }
                        _loc_16 = this.cfgnpcs[_loc_15];
                        if (_loc_16 == null)
                        {
                            return;
                        }
                        _loc_17 = UserData.getUserData();
                        this.areaStr = "taskfindpath#" + _loc_15 + "#";
                        this.msg1 = "接取：";
                        this.msg2 = "<u>(<A href=\"event:fnpc," + _loc_15 + "," + _loc_15 + "\">" + this.cfgNpc[_loc_16.npcid].name + "</A>)</u>";
                        this.curdata = "event:fnpc," + _loc_15 + "," + _loc_15;
                        this._heightt = this._heightt + 20;
                        this._h = this._h + 20;
                    }
                    else if (_loc_4["tid_" + this.data.cfg.taskid].state == 1)
                    {
                        this.addreciveHtml(this.data.cfg, "fnpc");
                        this._heightt = this._heightt + 20;
                        this._h = this._h + 20;
                    }
                    else if (_loc_4["tid_" + this.data.cfg.taskid].state == 2)
                    {
                        this._txtLink.text = "进行中";
                        this._txtLink.color = this._color;
                        this.addreciveHtml(this.data.cfg, "goal");
                        if (!this.isHasGoal)
                        {
                            this._h = this._h + 20;
                            this._heightt = this._heightt + 20;
                        }
                        _loc_18 = this.data.cfg.limit;
                        _loc_19 = _loc_18.split("#");
                        if (_loc_19[1] && int(_loc_19[1]) > 0)
                        {
                            this._txtLost.visible = true;
                            this._txtLost.y = this._heightt;
                            this._h = this._h + 20;
                            this._heightt = this._heightt + 20;
                            if (_loc_19[0] == 1)
                            {
                                _loc_20 = (ModelProxy.getValue("data", "servertime") + getTimer()) / 1000;
                                _loc_21 = _loc_20 - int(_loc_4["tid_" + this.data.cfg.taskid].time / 1000);
                                this.losttime = _loc_19[1] - _loc_21;
                                if (this.losttime <= 0)
                                {
                                    clearInterval(this.timeoutID);
                                    this.timeoutID = 0;
                                    PluginManager.instance.sendToServer("taskdialog", CMDTaskdialog.Submit, [_loc_7, 1]);
                                    return;
                                }
                                this._txtLost.text = "倒计时:" + MColor.getHMTL(TimeDataFormatUtil.getLeftTime2(this.losttime) + "", 9);
                                var _loc_23:String = this;
                                var _loc_24:* = this.losttime - 1;
                                _loc_23.losttime = _loc_24;
                                this.timeoutID = setInterval(this.setLost, 1000);
                            }
                            else
                            {
                                this._txtLost.text = "倒计时:" + MColor.getHMTL("", 9);
                            }
                        }
                        else
                        {
                            this._txtLost.visible = false;
                        }
                        if (this.data.cfg.taskid == 88)
                        {
                            GuideView.getInstance().doGuide(GuideType.GUIDE_ZD);
                        }
                    }
                    else if (_loc_4["tid_" + this.data.cfg.taskid].state == 3)
                    {
                        this._txtLink.text = "已完成";
                        this._txtLink.color = this._color;
                        this.addreciveHtml(this.data.cfg, "tnpc");
                        this._heightt = this._heightt + 20;
                        this._h = this._h + 20;
                        if (this.data.cfg.type == 4)
                        {
                            this.showmc = 1;
                            ModelProxy.change("guideitem", "guideid" + GuideType.GUIDE_XY4, this.btn);
                            ModelProxy.change("guideitem", "guideid" + GuideType.GUIDE_FXFG, this.btn);
                            _loc_22 = UserData.getUserData("mapid");
                            if (_loc_22 < 10000 && _loc_22 != 1035)
                            {
                                GuideView.getInstance().doGuide(GuideType.GUIDE_XY4);
                                GuideView.getInstance().doGuide(GuideType.GUIDE_FXFG);
                            }
                        }
                        else if (this.cfgmaps[_loc_6.mapid] && this.cfgmaps[_loc_6.mapid].cls == 6)
                        {
                            ModelProxy.change("guideitem", "guideid" + GuideType.GUIDE_ADQP, this.btn);
                            GuideView.getInstance().doGuide(GuideType.GUIDE_ADQP);
                        }
                    }
                    if (_loc_6.level <= 65 && this.data.cfg.type == 1 && !this.isHasGoal)
                    {
                        ModelProxy.change("guideitem", "guideid" + GuideType.GUIDE_RW, this._txtGoal1);
                    }
                    this._txtLink.visible = false;
                    this._txtGoal.text = this.msg1;
                    this._txtGoal.y = _loc_3;
                    if (!this.isHasGoal)
                    {
                        this._txtGoal1.text = this.msg2;
                        this._txtGoal1.y = this._txtGoal.y;
                        this._txtGoal1.color = this._color;
                    }
                    else
                    {
                        this._txtName.text = this._txtName.text + this.msg2;
                        this._txtGoal1.y = 0;
                    }
                    if (this.areaStr == null || this.areaStr == "" || _loc_6.level < 14)
                    {
                        this.btn.visible = false;
                    }
                }
                else
                {
                    this.btn.visible = false;
                    this._txtGoal.visible = false;
                    this._txtGoal1.visible = false;
                    this._txtLink.visible = false;
                }
            }
            this._w = this.width;
            return;
        }// end function

        private function setLost() : void
        {
            if (this.losttime <= 0)
            {
                clearInterval(this.timeoutID);
                this.timeoutID = 0;
                this._txtLost.visible = false;
                if (this.losttime <= 0)
                {
                    PluginManager.instance.sendToServer("taskdialog", CMDTaskdialog.Submit, [this.mtaskid, 1]);
                }
                return;
            }
            this._txtLost.text = "倒计时:" + MColor.getHMTL(TimeDataFormatUtil.getLeftTime2(this.losttime) + "", 9);
            var _loc_1:String = this;
            var _loc_2:* = this.losttime - 1;
            _loc_1.losttime = _loc_2;
            return;
        }// end function

        private function addreciveHtml(param1:Object, param2:String) : void
        {
            var nid:int;
            var nobj:Object;
            var myobj:Object;
            var str1:String;
            var goalparam:int;
            var cfginsatce:Object;
            var goalStr:String;
            var goalArr:Array;
            var task:Object;
            var i:int;
            var obj:Object;
            var countStr:String;
            var goaltype:int;
            var name:String;
            var showStr:String;
            var showArr:Array;
            var thish:int;
            var txt4:MyLabel;
            var txt44:MyLabel;
            var txt1:MyLabel;
            var txt11:MyLabel;
            var txt2:MyLabel;
            var txt22:MyLabel;
            var txt5:MyLabel;
            var txt55:MyLabel;
            var txt3:MyLabel;
            var txt33:MyLabel;
            var rewardsArr:Array;
            var guideObj:Object;
            var type:int;
            var gStr1:String;
            var gStr2:String;
            var gArr1:Array;
            var gArr2:Array;
            var j:int;
            var gx:int;
            var gy:int;
            var data:* = param1;
            var str:* = param2;
            if (str == "fnpc" && data.fnpc)
            {
                nid = this.mTasks[data.taskid].fnpc;
                nobj = this.cfgnpcs[nid];
                myobj = UserData.getUserData();
                this.areaStr = "taskfindpath#" + nid + "#";
                this.msg1 = "接取：";
                this.msg2 = "<u>(<A href=\"event:" + str + "," + nid + "\">" + this.cfgNpc[nobj.npcid].name + "</A>)</u>";
                this.curdata = "event:" + str + "," + nid;
            }
            else if (str == "tnpc" && data.tnpc)
            {
                if (data.chapterid > 0)
                {
                    this.areaStr = "";
                    this.msg1 = "";
                    this.msg2 = "点击交任务";
                    this.curdata = "chapter";
                }
                else
                {
                    nid = this.mTasks[data.taskid].tnpc;
                    nobj = this.cfgnpcs[nid];
                    myobj = UserData.getUserData();
                    this.areaStr = "taskfindpath#" + nid;
                    this.msg1 = "回复：";
                    this.msg2 = "<u>(<A href=\"event:" + str + "," + nid + "\">" + this.cfgNpc[nobj.npcid].name + "</A>)</u>";
                    this.curdata = "event:" + str + "," + nid;
                }
            }
            else if (str == "goal")
            {
                goalArr = data.goals;
                nid = this.mTasks[data.taskid].tnpc;
                task = UserData.getData(UserDataType.Task);
                i;
                while (i < goalArr.length)
                {
                    
                    obj = goalArr[0];
                    countStr = task["goal_" + obj.goalid];
                    if (!countStr)
                    {
                    }
                    else
                    {
                        countStr.replace(",", "/");
                        goaltype = obj.goaltype;
                        if (goaltype == 2)
                        {
                            str1;
                            if (obj.goalparam == "0")
                            {
                                str1;
                            }
                            else
                            {
                                str1 = this.cfgMoster[obj.goalparam].name;
                            }
                            this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                            this.msg2 = "<u><A href=\"event:" + str + "," + obj.x + "," + obj.y + "," + obj.stageid + "," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                            this.areaStr = "taskfindmaster#0#" + obj.stageid + "#" + obj.x + "#" + obj.y;
                            this.curdata = "event:" + str + "," + obj.x + "," + obj.y + "," + obj.stageid + "," + obj.goaltype + "," + obj.goalparam + "," + str1 + countStr.replace(",", "/");
                        }
                        else if (goaltype == 3)
                        {
                            goalparam = obj.goalparam;
                            str1;
                            this.areaStr = "taskfindmaster#0#" + obj.stageid + "#" + obj.x + "#" + obj.y;
                            if (goalparam == 1)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:qianghua\">" + str1 + "</A> </u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:qianghua" + str1 + countStr.replace(",", "/");
                            }
                            else if (goalparam == 2)
                            {
                                str1;
                            }
                            else if (goalparam == 3)
                            {
                                str1;
                            }
                            else if (goalparam == 4)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:" + str + ", " + nid + "," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "," + str1 + countStr.replace(",", "/");
                            }
                            else if (goalparam == 5)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:" + str + ", " + nid + "," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "," + str1 + countStr.replace(",", "/");
                            }
                            else if (goalparam == 350001)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:" + str + ", " + nid + "," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "," + str1 + countStr.replace(",", "/");
                            }
                            else if (goalparam == 1000)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:" + str + ", " + nid + "," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "," + str1 + countStr.replace(",", "/");
                            }
                            else if (goalparam == 1001)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "yabiao";
                            }
                            else if (goalparam == 1002)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:" + str + ", " + nid + "," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "," + str1 + countStr.replace(",", "/");
                            }
                            else if (goalparam == 1003)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "weiduan";
                                this.areaStr = null;
                            }
                            else if (goalparam == 722 || goalparam == 723)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:" + str + ", " + nid + "," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "," + str1 + countStr.replace(",", "/");
                            }
                            else if (goalparam == 1099)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:" + str + "," + 119 + "," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "," + str1 + countStr.replace(",", "/");
                                this.areaStr = null;
                            }
                            else if (goalparam == 1004)
                            {
                                str1;
                                this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                                this.msg2 = "<u><A href=\"event:" + str + ",0," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                                this.curdata = "event:" + str + "," + nid + "," + obj.stageid + "#" + obj.x + "#" + obj.y + ",0," + obj.goaltype + "," + str1 + countStr.replace(",", "/");
                            }
                        }
                        else if (goaltype == 4)
                        {
                            goalparam = obj.goalparam;
                            str1;
                            if (goalparam == 0)
                            {
                                str1;
                            }
                            else
                            {
                                str1 = this.cfgMoster[obj.goalparam].name;
                            }
                            this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                            this.msg2 = "<u><A href=\"event:" + str + "," + obj.x + "," + obj.y + "," + obj.stageid + "," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                            this.areaStr = "taskfindmaster#0#" + obj.stageid + "#" + obj.x + "#" + obj.y;
                            this.curdata = "event:" + str + "," + obj.x + "," + obj.y + "," + obj.stageid + "," + obj.goaltype + str1 + countStr.replace(",", "/");
                        }
                        else if (goaltype == 5)
                        {
                            goalparam = obj.goalparam;
                            str1 = this.cfgMoster[obj.goalparam].name;
                            this.msg1 = this.goalTypeArr[obj.goaltype] + ":";
                            this.msg2 = "<u><A href=\"event:" + str + "," + obj.x + "," + obj.y + "," + obj.stageid + "," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                            this.areaStr = "taskfindmaster#0#" + obj.stageid + "#" + obj.x + "#" + obj.y;
                            this.curdata = "event:" + str + "," + obj.x + "," + obj.y + "," + obj.stageid + "," + obj.goaltype + str1 + countStr.replace(",", "/");
                        }
                        else if (goaltype == 12 || goaltype == 10)
                        {
                            str1;
                            goalStr = this.goalTypeArr[obj.goaltype];
                            if (goalStr.indexOf("{0}") != -1)
                            {
                                name = this.cfgItem[obj.goalparam].name;
                                str1 = StringUtil.substitute(goalStr, name) + ":";
                            }
                            else
                            {
                                str1 = goalStr;
                            }
                            this.msg2 = "<u><A href=\"event:" + str + "," + obj.x + "," + obj.y + "," + obj.stageid + "," + obj.goaltype + "\">" + str1 + "</A></u></font> " + "<font color=\"#FF0000\">(" + countStr.replace(",", "/") + ")";
                            this.areaStr = "taskfindmaster#0#" + obj.stageid + "#" + gx + "#" + gy;
                            this.curdata = "event:" + str + "," + obj.x + "," + obj.y + "," + obj.stageid + "," + obj.goaltype + str1 + countStr.replace(",", "/");
                        }
                        else
                        {
                            if (showArr[2] == 1)
                            {
                                if (this.isFirst)
                                {
                                }
                            }
                            if (showArr[0] == 1)
                            {
                                if (this.isFirst)
                                {
                                }
                            }
                            if (showArr[1] == 1)
                            {
                                if (this.isFirst)
                                {
                                }
                            }
                            if (showArr[3] == 1)
                            {
                                if (this.isFirst)
                                {
                                }
                            }
                            if (this.isFirst)
                            {
                            }
                            if (this.cfgtaskguide[2] && this.cfgtaskguide[2][data.taskid] && int(this.cfgtaskguide[2][data.taskid].eventparam) > 0 && this.isFirst)
                            {
                                switch(type)
                                {
                                    case 1:
                                    {
                                        break;
                                    }
                                    case 2:
                                    {
                                        if (GuideView.getInstance().checkIsDo(guideObj.id))
                                        {
                                        }
                                        break;
                                    }
                                    case 3:
                                    {
                                        break;
                                    }
                                    case 4:
                                    {
                                        break;
                                    }
                                    default:
                                    {
                                        break;
                                        break;
                                    }
                                }
                            }
                            if (goaltype == 11)
                            {
                                if (goalStr.indexOf("{0}") != -1)
                                {
                                }
                                else
                                {
                                }
                            }
                            else if (goaltype == 16)
                            {
                                if (goalStr.indexOf("{0}") != -1)
                                {
                                }
                                else
                                {
                                }
                            }
                            else if (goaltype == 1024 || goaltype == 1021 || goaltype == 1036 || goaltype == 1028 || goaltype == 1060)
                            {
                                if (goalStr.indexOf("{0}") != -1)
                                {
                                }
                                else
                                {
                                }
                            }
                        }
                    }
                    i = (i + 1);
                }
            }
            return;
        }// end function

    }
}
